package org.BUPT.modules.system.service;

import org.BUPT.modules.system.domain.Subject;
import org.BUPT.modules.system.domain.User;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Sort;

import java.util.List;
import java.util.Set;

public interface SubjectService {

    /**
     * 获取部门列表数据
     * @param example 查询实例
     * @param sort 排序对象
     * @return 部门列表
     */
    List<Subject> getListByExample(Example<Subject> example, Sort sort);

    Page<Subject> getPageList(Example<Subject> example);

    Subject save(Subject dict);

    public List<User> getSutents(Long subjectId);

    public List<User> getTeachers(Long subjectId);


    public List<User> getSutentsNotIn(Long subjectId);
    List<User> getTeachersNotIn(Long subjectId);

    void addStudent(Long subjectId,Long studentId);

    Subject getSubject(Long subjectId);
    List<Subject> getSubjectsByUserId(Long userId);

    void deleteStudentByUserId(Long subjectId,Long studentId);
    void deleteTeacherByUserId(Long subjectId,Long studentId);
}
